<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
<style>

    .box{
        width: 100px;
        height: 50px;
        line-height: 50px;
        text-indent: 20px;
        background: blue;
        color: white;
    }
    span{
        width: 0;
        height: 0;
        display: inline-block;
        border: 5px solid transparent;
        border-top: 5px solid black;
        position: relative;
        top: 2.5px;
        /*相对定位 相对于原来的位置偏移一半 让其在中间 */
    }
    .box:hover span{
        border: 5px solid transparent;
        border-bottom: 5px solid black;
        top: -2.5px;
    }
</style>
</head>
<body>
    <div class="box">
        导航
        <span>

        </span>
    </div>
    
</body>
</html>